package com.ruoyi.exam.mapper;

import com.ruoyi.exam.domain.ExamPaperAnswer;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.exam.domain.other.KeyValue;
import com.ruoyi.exam.viewmodel.admin.paper.ExamPaperAnswerPageRequestVM;
import com.ruoyi.exam.viewmodel.student.exampaper.ExamPaperAnswerPageVM;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * <p>
 * 试卷答案表 Mapper 接口
 * </p>
 *
 * @author JY
 * @since 2024-02-26
 */
@Mapper
public interface ExamPaperAnswerMapper extends BaseMapper<ExamPaperAnswer> {

    List<ExamPaperAnswer> studentPage(ExamPaperAnswerPageVM requestVM);

    Integer selectAllCount();

    List<KeyValue> selectCountByDate(@Param("startTime") Date startTime, @Param("endTime") Date endTime);

    ExamPaperAnswer getByPidUid(@Param("pid") Integer paperId, @Param("uid") Integer uid);

    List<ExamPaperAnswer> adminPage(ExamPaperAnswerPageRequestVM requestVM);

}
